package com.am.words;

import java.util.ArrayList;
import java.util.List;

public class Word implements IWord {

	private List<ICharacter> chars;
	
	public Word(String s){
		chars = new ArrayList<ICharacter>();
		for (int i = 0; i < s.length(); i++) {
			ICharacter c = new Character(String.valueOf(s.charAt(i)));
			this.addCharacter(c);
		}
	}

	@Override
	public void addCharacter(ICharacter c) {
		this.chars.add(c);
	}

	@Override
	public List<ICharacter> getCharacters() {
		return this.chars;
	}

	@Override
	public void setCharacters(List<ICharacter> chars) {
		this.chars = chars;
	}

}
